package com.norbitltd.guavaleaves.java.lang;

import com.google.common.base.Function;

public class DoubleFunctions {	
	public static Function<Double, Double> abs() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.abs(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.acos
	 */
	public static Function<Double, Double> acos() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.acos(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.asin
	 */
	public static Function<Double, Double> asin() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.asin(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.atan
	 */
	public static Function<Double, Double> atan() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.atan(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.atan2
	 */
	public static Function<Double, Double> atan2(final double arg2) {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.atan2(input, arg2);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.cbrt
	 */
	public static Function<Double, Double> cbrt() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.cbrt(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.ceil
	 */
	public static Function<Double, Double> ceil() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.ceil(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.copySign
	 */
	public static Function<Double, Double> copySign(final double arg2) {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.copySign(input, arg2);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.cos
	 */
	public static Function<Double, Double> cos() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.cos(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.cosh
	 */
	public static Function<Double, Double> cosh() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.cosh(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.exp
	 */
	public static Function<Double, Double> exp() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.exp(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.expm1
	 */
	public static Function<Double, Double> expm1() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.expm1(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.floor
	 */
	public static Function<Double, Double> floor() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.floor(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.hypot
	 */
	public static Function<Double, Double> hypot(final double arg1) {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.hypot(input, arg1);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.IEEEremainder
	 */
	public static Function<Double, Double> IEEEremainder(final double arg1) {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.IEEEremainder(input, arg1);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.log
	 */
	public static Function<Double, Double> log() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.log(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.log10
	 */
	public static Function<Double, Double> log10() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.log10(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.log1p
	 */
	public static Function<Double, Double> log1p() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.log1p(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.max
	 */
	public static Function<Double, Double> max(final double arg1) {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.max(input, arg1);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.min
	 */
	public static Function<Double, Double> min(final double arg1) {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.min(input, arg1);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.nextAfter
	 */
	public static Function<Double, Double> nextAfter(final double arg1) {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.nextAfter(input, arg1);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.nextUp
	 */
	public static Function<Double, Double> nextUp() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.nextUp(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.pow
	 */
	public static Function<Double, Double> pow(final double arg1) {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.pow(input, arg1);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.rint
	 */
	public static Function<Double, Double> rint() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.rint(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.scalb
	 */
	public static Function<Double, Double> scalb(final int arg1) {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.scalb(input, arg1);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.signum
	 */
	public static Function<Double, Double> signum() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.signum(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.sin
	 */
	public static Function<Double, Double> sin() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.sin(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.sinh
	 */
	public static Function<Double, Double> sinh() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.sinh(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.sqrt
	 */
	public static Function<Double, Double> sqrt() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.sqrt(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.tan
	 */
	public static Function<Double, Double> tan() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.tan(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.tanh
	 */
	public static Function<Double, Double> tanh() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.tanh(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.toDegrees
	 */
	public static Function<Double, Double> toDegrees() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.toDegrees(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.toRadians
	 */
	public static Function<Double, Double> toRadians() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.toRadians(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.ulp
	 */
	public static Function<Double, Double> ulp() {
		return new Function<Double, Double>() {
			public Double apply(Double input) {
				return Math.ulp(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.getExponent
	 */
	public static Function<Double, Integer> getExponent() {
		return new Function<Double, Integer>() {
			public Integer apply(Double input) {
				return Math.getExponent(input);
			}
		};
	}
	
	/**
	 * @see java.lang.Math.round
	 */
	public static Function<Double, Long> round() {
		return new Function<Double, Long>() {
			public Long apply(Double input) {
				return Math.round(input);
			}
		};
	}
}
